import Layout from '@/layout'

const goodsRouter = {
  path: '/goods',
  component: Layout,
  redirect: '/rights/list',
  name: 'goods',
  meta: { 
    alwaysShow: true,
    title: 'goods', 
    icon: 'goods', 
    permission: ['goods_101_01']
  },
  children: [
    {
      path: 'list',
      component: () => import('@/views/goods/list'),
      name: 'goods_list',
      meta: {
        title: 'goods_list',
        permission: ['goods_104_02']
      },
    },
    {
      path: 'params',
      component: () => import('@/views/goods/params'),
      name: 'goods_params',
      meta: { 
        title: 'goods_params',
        permission: ['params_115_02']
      },   
    },
    {
      path: 'categories',
      component: () => import('@/views/goods/categories'),
      name: 'goods_categories',
      meta: { 
        title: 'goods_categories',
        permission: ['categories_121_02']
      },   
    },
    {
      path: 'good-add',
      component: () => import('@/views/goods/goodForm'),
      name: 'goods_add',
      meta: { 
        hidden: true,
        title: 'goods_add',
        permission: ['goods_105_03'],
        activeMenu: '/goods/list',
      },   
    },
  ]
}

export default goodsRouter
